/**	@file ComparerIx.h
 * @brief Comparative functions.*/
#ifndef ComparerIx_h_majdo
#define ComparerIx_h_majdo
#include <vector>
#include "Ex.h"
#include "Number.h"
namespace sympycpp {
class Pow;
class Mul;
class Add;
class Fx;
/**	@class ComparerIx 
 * 	@brief This class encapsulates comparative functions and function that detects possibility of simplification. */
class ComparerIx{
public :
	/**	@brief Operator < "less than" for addition.
	 * 	This function is designed as a comparative function for function containerSort. 
	 * 	@warning The compared expressions can not be addition, because this function 
	 * 	compare addends that can not be addition (it is prohibited by construction rules - invariant). 
	 * 	Consequently, correct results are not guaranteed in this case.
	 * 	@see addLessThan --> implementation of this comparison*/
	static bool addlt(const Ex * l, const Ex * r) {
		return addLessThan(l,r);
	}
	/**	@brief Operator < "less than" for multplication.
	 * 	This function is designed as a comparative function for function containerSort. 
	 * 	@warning The compared expressions can not be multiplication, because this function 
	 * 	compare multiplicandss that can not be multiplication (it is prohibited by construction rules - invariant). 
	 * 	Consequently, correct results are not guaranteed in this case.
	 * 	@see mulLessThan --> implementation of this comparison*/
	static bool mullt(const Ex * l, const Ex * r) {
		return mulLessThan(l,r);
	}
	/**	@brief Control of possibility of simplification of additions. 
	 * 	@returns compatibility --> enumeration of expression relations 
	 * 	@see compatibility*/
	static compatibility compatibilityForAddition(const Ex * L, const Ex * R);
	/**	@brief Control of possibility of simplification of multiplications. 
	 * 	@returns compatibility --> enumeration of expression relations 
	 * 	@see compatibility*/
	static compatibility compatibilityForMultiplication(const Ex * L, const Ex * R);
	/**	@brief Operator < "less than" for addition.
	 * 	@param L is compared expression
	 * 	@param R is compared expression
	 * 	@param compareSignSym is attribute that means to ignore unary signs of variables if it is false.
	 * 	@warning The compared expressions can not be addition, because this function 
	 * 	compare addends that can not be addition (it is prohibited by construction rules - invariant). 
	 * 	Consequently, correct results are not guaranteed in this case.*/
	static bool addLessThan(const Ex * L, const Ex * R, const  bool compareSignSym = true);
	/**	@brief Operator < "less than" for multplication.
	 * 	@param compareSignSym is attribute that means to ignore unary signs of variables if it is false.
	 * 	@warning The compared expressions can not be multiplication, because this function 
	 * 	compare multiplicandss that can not be multiplication (it is prohibited by construction rules - invariant). 
	 * 	Consequently, correct results are not guaranteed in this case.*/
	static bool mulLessThan(const Ex * L, const Ex * R, const  bool compareSignSym = true);
	/**	@brief Simple comparison of textual forms of expressions.*/
	static bool textCompare(const Ex * L, const Ex * R);
	/**	@brief Simple comparison of textual forms of expressions (without signs).*/
	static bool unsignedTextCompare(const Ex * L, const Ex * R);
	/** 	@brief Sequential comparison of expressions. */
	static bool auxCompareSubExpresions(const Ex * L, const Ex * R, const  bool compareSignSym = true);
	/**	@brief Operator < "less than" for expressions.
	 * 	This is common comparative functions for addends and multiplicands. 
	 * 	@param L is compared expression
	 * 	@param R is compared expression
	 * 	@param compareSignSym is attribute that means to ignore unary signs of variables if it is false.*/
	static bool auxLessThan(const Ex * L, const Ex * R, const  bool compareSignSym = true); 
private :
	ComparerIx () {}
};
}
#endif
